package com.lbw.mapper;

import com.lbw.entity.VideoEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author lbw
 * @since 2020-09-13
 */
public interface VideoEntityMapper extends BaseMapper<VideoEntity> {

    /**
     * 通过课程id查询视频信息
     * @param subjectId 科目id
     * @return 视频信息
     */
    List<VideoEntity> selectVideoBySubjectId(@Param("subjectId") String subjectId,@Param("stuId") String stuId);

    /**
     * 通过课程id与章节id查询视频信息
     */
    List<Map<String,Object>> selectVideoBySubjectAndChapter(@Param("subjectId") String subjectId, @Param("chapterId") String chapterId,@Param("stuId") String stuId);
}
